Fix: Dottips do not disappear when other parts of the editor are engaged #17663
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #8181
This PR makes DotTips disappear when a click outside happens. The logic got a little bit more complex because we want to allow clicks on the target (outside the popover), so if the tip says to click the inserter and the user clicks the inserter the dot tips do not disappear.
How has this been tested?
I opened block editor.
I cleaned the local storage by executing
window.localStorage.clear();
on the browser console.I refreshed block editor and verified tips close if I click/focus outside them.
I redid the test and verified tips don't close if their target is clicked e.g: inserter on the first one.
cc: @mapk as the creator of the issue.